﻿function checkAll(obj) {
    var ch = obj;
    var State = ch.checked;
    var elem = ch.form.elements;

    for (var i = 0; i < elem.length; i++) {
        if (elem[i].type == "checkbox" && elem[i] != ch.id) {
            elem[i].checked = ch.checked;
        }
    }
}
function checkNone(ch) {
    var bl = false;
    var cbs = ch.form.elements;
    for (var i = 0; i < cbs.length; i++) {
        if (cbs[i].type == "checkbox") {
            if (cbs[i].checked) {
                bl = true;
            }
        }
    }
    if (bl) {
        return true;
    }
    else { alert("请选择要删除的项"); return false; }
}

function checkFor(ch) {
    var bl = false;
    var cbs = ch.form.elements;
    for (var i = 0; i < cbs.length; i++) {
        if (cbs[i].type == "checkbox") {
            if (cbs[i].checked) {
                bl = true;

            }
        }
    }
    if (bl) {
        return true;
    }
    else { alert("请选择要禁用的项"); return false; }
}
function checkRun(ch) {
    var bl = false;
    var cbs = ch.form.elements;
    for (var i = 0; i < cbs.length; i++) {
        if (cbs[i].type == "checkbox") {
            if (cbs[i].checked) {
                bl = true;

            }
        }
    }
    if (bl) {
        return true;
    }
    else { alert("请选择要启用的项"); return false; }
}
function checkMod(ch) {
    var bl = false;
    var cbs = ch.form.elements;
    for (var i = 0; i < cbs.length; i++) {
        if (cbs[i].type == "checkbox") {
            if (cbs[i].checked) {
                bl = true;

            }
        }
    }
    if (bl) {
        return true;
    }
    else { alert("请选择要修改的项"); return false; }
}